Inserting scripts

You can enter JavaScript and VBScript in the Document window without having to use the HTML Source inspector.

To display script markers in the document window, choose View > Invisible Elements. See also Invisible Elements preferences.

To insert a script:

1 Place the cursor where you want the script.
2 Click the Script button on the Object palette or choose Insert > Script.
3 In the dialog box that appears, choose the scripting language from the pop-up menu.
If you are using JavaScript and are unsure of the version, choose JavaScript rather than JavaScript1.1 or JavaScript1.2.
4 Enter the code that should appear between the script tags.
To link to an external script file, click OK without typing anything and then add the reference to the source file in the Property inspector (type the file name in the Source box, or click the folder icon to browse to and select the file).

To edit the script:

1 Select the Script icon.
2 In the Property inspector, click Edit.